package com.education.teach.mvp.ui.adapter;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.education.teach.R;
import com.education.teach.mvp.model.bean.SchoolBean;

import java.util.List;

public class SchoolAdapter extends BaseQuickAdapter<SchoolBean, BaseViewHolder> {

    public SchoolAdapter(int layoutResId, @Nullable List<SchoolBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SchoolBean item) {
        helper.setText(R.id.text, item.getTitle())
                .setImageResource(R.id.image, item.getRes());
    }
}
